<?php

class Contact_model extends MY_Model{

	public function __construct(){
		parent::__construct();
		$this->table = 'alsa_contact';
		$this->as = 'c';
		$this->relations = array(
		    array(
			'table' => 'alsa_node',
			'as' => 'n',
			'local' => 'map',
			'foreign' => 'id',
			'type' => 'left'
		    )
		);
		$this->columns = array(
		    '*',array('n.name','map_name')
		);
	}

}
